-
Notifications
You must be signed in to change notification settings - Fork 2
test: make tests compatible with Vaadin 25 #160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughSwitches test routes and client-callable annotations to instrumented/legacy variants, relaxes header assertions to substring matching, adds a test service initializer registering instrumented routes, updates test copyright years, and bumps a testbench dependency and license-plugin excludes in the POM. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Possibly related PRs
Suggested reviewers
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing touches
📜 Recent review detailsConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (8)
🚧 Files skipped from review as they are similar to previous changes (4)
🧰 Additional context used🧬 Code graph analysis (1)src/test/java/com/flowingcode/vaadin/addons/gridhelpers/it/ViewInitializerImpl.java (2)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
🔇 Additional comments (8)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (8)
pom.xmlsrc/test/java/com/flowingcode/vaadin/addons/gridhelpers/it/HeaderFooterStylesIT.javasrc/test/java/com/flowingcode/vaadin/addons/gridhelpers/it/HeaderFooterStylesView.javasrc/test/java/com/flowingcode/vaadin/addons/gridhelpers/it/HeightByRowsITView.javasrc/test/java/com/flowingcode/vaadin/addons/gridhelpers/it/IntegrationView.javasrc/test/java/com/flowingcode/vaadin/addons/gridhelpers/it/ResponsiveGridITView.javasrc/test/java/com/flowingcode/vaadin/addons/gridhelpers/it/ViewInitializerImpl.javasrc/test/resources/META-INF/services/com.vaadin.flow.server.VaadinServiceInitListener
🧰 Additional context used
🧬 Code graph analysis (1)
src/test/java/com/flowingcode/vaadin/addons/gridhelpers/it/ViewInitializerImpl.java (2)
src/test/java/com/flowingcode/vaadin/addons/gridhelpers/it/HeaderFooterStylesView.java (1)
SuppressWarnings(40-120)src/test/java/com/flowingcode/vaadin/addons/gridhelpers/it/IntegrationView.java (1)
SuppressWarnings(42-187)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: build-vaadin24
🔇 Additional comments (18)
pom.xml (1)
131-131: LGTM! Dependency version updated.The testbench-rpc library has been updated to version 1.4.0, which aligns with the PR objective to support Vaadin 25 compatibility.
src/test/resources/META-INF/services/com.vaadin.flow.server.VaadinServiceInitListener (1)
1-1: LGTM! Service provider configuration added correctly.This service descriptor properly registers the ViewInitializerImpl to enable instrumented route registration during test initialization.
src/test/java/com/flowingcode/vaadin/addons/gridhelpers/it/HeaderFooterStylesIT.java (3)
22-23: LGTM! Imports updated for Hamcrest assertions.The switch from JUnit's assertEquals to Hamcrest's containsString matcher is appropriate for validating partial class attribute matches.
58-63: Excellent fix for Vaadin 25 compatibility!Switching from exact class attribute matching to substring matching correctly addresses the test failures noted in issue #158. This accommodates the additional CSS classes that Vaadin 25 adds (e.g., "cell", "header-cell", "first-column-cell") while still verifying the custom classes are applied.
76-77: LGTM! Consistent assertion pattern applied.The substring matching approach is consistently applied to handle Vaadin 25's additional CSS classes.
src/test/java/com/flowingcode/vaadin/addons/gridhelpers/it/HeightByRowsITView.java (3)
24-25: LGTM! Annotations migrated to instrumented variants.The migration from standard Vaadin annotations to instrumented variants enables proper test instrumentation for Vaadin 25 compatibility.
39-39: LGTM! Route annotation updated consistently.The @InstrumentedRoute annotation works in conjunction with ViewInitializerImpl to register this test view properly.
89-89: LGTM! Client-callable annotation updated.The @LegacyClientCallable annotation maintains RPC functionality while supporting the instrumented routing approach.
src/test/java/com/flowingcode/vaadin/addons/gridhelpers/it/ViewInitializerImpl.java (1)
26-34: LGTM! Test initializer properly registers instrumented routes.The ViewInitializerImpl correctly registers all four test views that have been migrated to use @InstrumentedRoute annotations, enabling proper test discovery and execution in Vaadin 25.
src/test/java/com/flowingcode/vaadin/addons/gridhelpers/it/HeaderFooterStylesView.java (3)
24-25: LGTM! Imports updated for instrumented annotations.The imports align with the test infrastructure changes for Vaadin 25 compatibility.
41-41: LGTM! Route annotation migrated consistently.The @InstrumentedRoute annotation is consistent with the other test views and properly registered in ViewInitializerImpl.
62-62: LGTM! Client-callable annotation updated.The @LegacyClientCallable annotation maintains the RPC testing functionality.
src/test/java/com/flowingcode/vaadin/addons/gridhelpers/it/ResponsiveGridITView.java (3)
25-26: LGTM! Annotations migrated to instrumented variants.The import changes support the instrumented routing pattern used throughout the test suite.
39-39: LGTM! Route annotation updated consistently.The @InstrumentedRoute annotation follows the pattern applied to all test views in this PR.
63-63: LGTM! Client-callable annotation updated.The @LegacyClientCallable annotation maintains RPC functionality with instrumentation support.
src/test/java/com/flowingcode/vaadin/addons/gridhelpers/it/IntegrationView.java (3)
26-27: LGTM! Imports updated for instrumented routing.The import changes complete the systematic migration of all test views to use instrumented annotations.
43-43: LGTM! Route annotation migrated to instrumented variant.The @InstrumentedRoute annotation is properly registered in ViewInitializerImpl along with the other test views.
80-80: LGTM! Client-callable annotation updated.The @LegacyClientCallable annotation maintains the RPC functionality required for integration testing.
src/test/java/com/flowingcode/vaadin/addons/gridhelpers/it/ViewInitializerImpl.java
Show resolved
Hide resolved
|



Close #158
Summary by CodeRabbit
Tests
Chores
✏️ Tip: You can customize this high-level summary in your review settings.